Micron Document
🎖️GitЯра🎖️


Displaying Raw • Download

core/model/src/commonMain/kotlin/org/meshtastic/core/model/DeviceMetrics.kt 4e15ef1c7f68f8c683fe8b7ff741a5167e154d2e (4e15ef1c) Text, 1.51 KB

T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.core.model

Tff7b72import T7ee787org.meshtastic.core.common.util.nowSeconds

Tff7b72data Tff7b72class T56d364DeviceMetricsTb4b4b4(
Tff7b72val Te6edf3timeTb4b4b4: Tffa657Int Tff7b72= Te6edf3currentTimeTb4b4b4(Tb4b4b4)Tb4b4b4, T8b949e// default to current time in secs (NOT MILLISECONDS!)
Tff7b72val Te6edf3batteryLevelTb4b4b4: Tffa657Int Tff7b72= T79c0ff0Tb4b4b4,
Tff7b72val Te6edf3voltageTb4b4b4: Tffa657FloatTb4b4b4,
Tff7b72val Te6edf3channelUtilizationTb4b4b4: Tffa657FloatTb4b4b4,
Tff7b72val Te6edf3airUtilTxTb4b4b4: Tffa657FloatTb4b4b4,
Tff7b72val Te6edf3uptimeSecondsTb4b4b4: Tffa657IntTb4b4b4,
Tb4b4b4) Tb4b4b4{
Tff7b72companion Tff7b72object Tb4b4b4{
Tf0883e@SuppressTb4b4b4(Ta5d6ff"Ta5d6ffMagicNumberTa5d6ff"Tb4b4b4)
Tff7b72fun Td2a8ffcurrentTimeTb4b4b4(Tb4b4b4) Tff7b72= Te6edf3nowSecondsTb4b4b4.Te6edf3toIntTb4b4b4(Tb4b4b4)
Tb4b4b4}

T8b949e/** Create our model object from a protobuf. */
Tff7b72constructorTb4b4b4(
Te6edf3pTb4b4b4: Te6edf3orgTb4b4b4.Te6edf3meshtasticTb4b4b4.Te6edf3protoTb4b4b4.Te6edf3DeviceMetricsTb4b4b4,
Te6edf3telemetryTimeTb4b4b4: Tffa657Int Tff7b72= Te6edf3currentTimeTb4b4b4(Tb4b4b4)Tb4b4b4,
Tb4b4b4) Tb4b4b4: Tff7b72thisTb4b4b4(
Te6edf3telemetryTimeTb4b4b4,
Te6edf3pTb4b4b4.Te6edf3battery_level Tff7b72?: T79c0ff0Tb4b4b4,
Te6edf3pTb4b4b4.Te6edf3voltage Tff7b72?: T79c0ff0fTb4b4b4,
Te6edf3pTb4b4b4.Te6edf3channel_utilization Tff7b72?: T79c0ff0fTb4b4b4,
Te6edf3pTb4b4b4.Te6edf3air_util_tx Tff7b72?: T79c0ff0fTb4b4b4,
Te6edf3pTb4b4b4.Te6edf3uptime_seconds Tff7b72?: T79c0ff0Tb4b4b4,
Tb4b4b4)
Tb4b4b4}

Served by rngit 1.5.0 - Generated in 0.04s